package com.example.kabaouser.exception;

import com.example.kabaouser.enums.ResultEnum;
import lombok.Data;

@Data
public class CreditException extends RuntimeException{

    private int code;

    public CreditException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public CreditException(int code, String message) {
        super(message);
        this.code = code;
    }
}
